/*
	Copyright (c) 2009-2011, Stefan Webb.

	This file is part of SimpleML. Please read the file "license.txt", 
	which contains the conditions under which this software is distributed.
*/

/*!
	\file threads.h
	\author Stefan Webb
	\brief Definition of Threads class
*/

#ifndef CRITICALSECTION_H
#define CRITICALSECTION_H

/*! \brief A class abstracting cross platform use of critical sections. */
class CriticalSection
{
public:
	/*! \brief Default constructor. */
	CriticalSection();

	/*! \brief Default destructor. */
	~CriticalSection();

	/*! \brief Enter critical section. */
	void enter();

	/*! \brief Exit critical section. */
	void exit();

protected:
	/*! \brief Win32 critical section structure. */
	CRITICAL_SECTION criticalSection_;
};

#endif